module majiang.Views {
    /**
     * HupaiPaixing
     */
    export class HupaiPaixing extends eui.Component {
        //eui
        public bgImg:eui.Image;
        public textLabel:eui.Label;

        //data
        public paixingText:string;

        constructor() {
            super();
            
            this.skinName = "hupaiPaixingSkin";
            
            this.addEventListener(egret.Event.ADDED,this.addedTween,this);
        }

        private addedTween() {
            if(this.paixingText){
                this.textLabel.text = majiang.Datas.TIPS[this.paixingText];
            }

            this.bgImg.y = 150;
            egret.Tween.get(this.bgImg).to({y:0},200);
            this.textLabel.y = 150;
            egret.Tween.get(this.textLabel).to({y:0},200);
        }
    }
}